<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
          div{
               width: 500px;
              overflow: hidden;

          }
          div img{
              /* width: 100%; */
              /* max-width: 80%; */
              max-height: 100px ;
          }
    </style>
</head>
<body>
<div id="a">
<img id="imga" src="img/stainless-steel-fork-near-clear-glass-on-tray-1510690.jpg" width="800px">
</div>
</body>
<script>
      var a = document.getElementById('imga');
      window.onmousemove= function(event){
               var X = event.pageX;
               var Y  = event.pageY;
               var width =   document.body.clientWidth;
              var bai =   X / width;
               var fen = 100 - bai * 100;
               a.style.filter = "blur("+fen+"px)";
            console.log(bai * 100);
      }
</script>
</html>